//    Copyright (C) Kherty.  All rights reserved.
using System.Reflection;
using System.Windows;

namespace OpenLS.Spreadsheet.UI
{
    class SpreadsheetUIResourceKey : ResourceKey
    {
        public override Assembly Assembly
        {
            get { return typeof(SpreadsheetUIResourceKey).Assembly; }
        }

        public SpreadsheetUIResourceKey(SpreadsheetUIResourceId resourceId)
        {
            ResourceId = resourceId;
        }
        SpreadsheetUIResourceId ResourceId;

        public override int GetHashCode()
        {
            return Assembly.GetHashCode() + ResourceId.GetHashCode();
        }
        public override bool Equals(object obj)
        {
            if (obj == this)
                return true;
            SpreadsheetUIResourceKey key = obj as SpreadsheetUIResourceKey;
            if (key == null)
                return false;
            return key.Assembly == Assembly && key.ResourceId == ResourceId;
        }
        public override string ToString()
        {
            return base.ToString() + " " + this.ResourceId;
        }
    }
}
